package io.readerandwriter;

import org.junit.jupiter.api.Test;

import java.io.*;

/**
 * @author lianmingzhang
 * @create 2017-09-02 下午8:36
 */
public class Demo_06 {
    @Test
    public void testWriter() {
        try {
            Writer out = new CharArrayWriter();
            char[] network = {'N', 'e', 't', 'w', 'o', 'r', 'k', '!'};
            out.write(network,0,network.length);
            System.out.println(out);
        } catch (Exception e) {
            e.printStackTrace();
        }

    }

}
